package com.eshop.modules.system.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("menu")
public class Menu extends BaseDomain
{
    @TableId
    private Long id;
    private Boolean iFrame;
    @NotBlank(message = "请填写菜单名称")
    private String name;
    private String component;
    @NotNull(message = "上级菜单ID不能为空")
    private Long pid;
    @NotNull(message = "排序不能为空")
    private Long sort;
    private String icon;
    private String path;
    private Boolean cache;
    private Boolean hidden;
    private String componentName;
    private String permission;
    private Integer type;
    
    public void copy(final Menu source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getId() {
        return this.id;
    }
    
    public Boolean getIFrame() {
        return this.iFrame;
    }
    
    public String getName() {
        return this.name;
    }
    
    public String getComponent() {
        return this.component;
    }
    
    public Long getPid() {
        return this.pid;
    }
    
    public Long getSort() {
        return this.sort;
    }
    
    public String getIcon() {
        return this.icon;
    }
    
    public String getPath() {
        return this.path;
    }
    
    public Boolean getCache() {
        return this.cache;
    }
    
    public Boolean getHidden() {
        return this.hidden;
    }
    
    public String getComponentName() {
        return this.componentName;
    }
    
    public String getPermission() {
        return this.permission;
    }
    
    public Integer getType() {
        return this.type;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setIFrame(final Boolean iFrame) {
        this.iFrame = iFrame;
    }
    
    public void setName(final String name) {
        this.name = name;
    }
    
    public void setComponent(final String component) {
        this.component = component;
    }
    
    public void setPid(final Long pid) {
        this.pid = pid;
    }
    
    public void setSort(final Long sort) {
        this.sort = sort;
    }
    
    public void setIcon(final String icon) {
        this.icon = icon;
    }
    
    public void setPath(final String path) {
        this.path = path;
    }
    
    public void setCache(final Boolean cache) {
        this.cache = cache;
    }
    
    public void setHidden(final Boolean hidden) {
        this.hidden = hidden;
    }
    
    public void setComponentName(final String componentName) {
        this.componentName = componentName;
    }
    
    public void setPermission(final String permission) {
        this.permission = permission;
    }
    
    public void setType(final Integer type) {
        this.type = type;
    }
    
    public String toString() {
        return "Menu(id=" + this.getId() + ", iFrame=" + this.getIFrame() + ", name=" + this.getName() + ", component=" + this.getComponent() + ", pid=" + this.getPid() + ", sort=" + this.getSort() + ", icon=" + this.getIcon() + ", path=" + this.getPath() + ", cache=" + this.getCache() + ", hidden=" + this.getHidden() + ", componentName=" + this.getComponentName() + ", permission=" + this.getPermission() + ", type=" + this.getType() + ")";
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof Menu)) {
            return false;
        }
        final Menu other = (Menu)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0075: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0075;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0075;
            }
            return false;
        }
        final Object this$iFrame = this.getIFrame();
        final Object other$iFrame = other.getIFrame();
        Label_0112: {
            if (this$iFrame == null) {
                if (other$iFrame == null) {
                    break Label_0112;
                }
            }
            else if (this$iFrame.equals(other$iFrame)) {
                break Label_0112;
            }
            return false;
        }
        final Object this$pid = this.getPid();
        final Object other$pid = other.getPid();
        Label_0149: {
            if (this$pid == null) {
                if (other$pid == null) {
                    break Label_0149;
                }
            }
            else if (this$pid.equals(other$pid)) {
                break Label_0149;
            }
            return false;
        }
        final Object this$sort = this.getSort();
        final Object other$sort = other.getSort();
        Label_0186: {
            if (this$sort == null) {
                if (other$sort == null) {
                    break Label_0186;
                }
            }
            else if (this$sort.equals(other$sort)) {
                break Label_0186;
            }
            return false;
        }
        final Object this$cache = this.getCache();
        final Object other$cache = other.getCache();
        Label_0223: {
            if (this$cache == null) {
                if (other$cache == null) {
                    break Label_0223;
                }
            }
            else if (this$cache.equals(other$cache)) {
                break Label_0223;
            }
            return false;
        }
        final Object this$hidden = this.getHidden();
        final Object other$hidden = other.getHidden();
        Label_0260: {
            if (this$hidden == null) {
                if (other$hidden == null) {
                    break Label_0260;
                }
            }
            else if (this$hidden.equals(other$hidden)) {
                break Label_0260;
            }
            return false;
        }
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        Label_0297: {
            if (this$type == null) {
                if (other$type == null) {
                    break Label_0297;
                }
            }
            else if (this$type.equals(other$type)) {
                break Label_0297;
            }
            return false;
        }
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        Label_0334: {
            if (this$name == null) {
                if (other$name == null) {
                    break Label_0334;
                }
            }
            else if (this$name.equals(other$name)) {
                break Label_0334;
            }
            return false;
        }
        final Object this$component = this.getComponent();
        final Object other$component = other.getComponent();
        Label_0371: {
            if (this$component == null) {
                if (other$component == null) {
                    break Label_0371;
                }
            }
            else if (this$component.equals(other$component)) {
                break Label_0371;
            }
            return false;
        }
        final Object this$icon = this.getIcon();
        final Object other$icon = other.getIcon();
        Label_0408: {
            if (this$icon == null) {
                if (other$icon == null) {
                    break Label_0408;
                }
            }
            else if (this$icon.equals(other$icon)) {
                break Label_0408;
            }
            return false;
        }
        final Object this$path = this.getPath();
        final Object other$path = other.getPath();
        Label_0445: {
            if (this$path == null) {
                if (other$path == null) {
                    break Label_0445;
                }
            }
            else if (this$path.equals(other$path)) {
                break Label_0445;
            }
            return false;
        }
        final Object this$componentName = this.getComponentName();
        final Object other$componentName = other.getComponentName();
        Label_0482: {
            if (this$componentName == null) {
                if (other$componentName == null) {
                    break Label_0482;
                }
            }
            else if (this$componentName.equals(other$componentName)) {
                break Label_0482;
            }
            return false;
        }
        final Object this$permission = this.getPermission();
        final Object other$permission = other.getPermission();
        if (this$permission == null) {
            if (other$permission == null) {
                return true;
            }
        }
        else if (this$permission.equals(other$permission)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof Menu;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $iFrame = this.getIFrame();
        result = result * 59 + (($iFrame == null) ? 43 : $iFrame.hashCode());
        final Object $pid = this.getPid();
        result = result * 59 + (($pid == null) ? 43 : $pid.hashCode());
        final Object $sort = this.getSort();
        result = result * 59 + (($sort == null) ? 43 : $sort.hashCode());
        final Object $cache = this.getCache();
        result = result * 59 + (($cache == null) ? 43 : $cache.hashCode());
        final Object $hidden = this.getHidden();
        result = result * 59 + (($hidden == null) ? 43 : $hidden.hashCode());
        final Object $type = this.getType();
        result = result * 59 + (($type == null) ? 43 : $type.hashCode());
        final Object $name = this.getName();
        result = result * 59 + (($name == null) ? 43 : $name.hashCode());
        final Object $component = this.getComponent();
        result = result * 59 + (($component == null) ? 43 : $component.hashCode());
        final Object $icon = this.getIcon();
        result = result * 59 + (($icon == null) ? 43 : $icon.hashCode());
        final Object $path = this.getPath();
        result = result * 59 + (($path == null) ? 43 : $path.hashCode());
        final Object $componentName = this.getComponentName();
        result = result * 59 + (($componentName == null) ? 43 : $componentName.hashCode());
        final Object $permission = this.getPermission();
        result = result * 59 + (($permission == null) ? 43 : $permission.hashCode());
        return result;
    }
}
